3.138 \(\int (g+h x)^{-3-2 p} (a+c x^2)^p (d+e x+f x^2) \, dx\)

Optimal. Leaf size=474 \[ -\frac {f \left (a+c x^2\right )^p (g+h x)^{-2 p} \left (1-\frac {g+h x}{g-\frac {\sqrt {-a} h}{\sqrt {c}}}\right )^{-p} \left (1-\frac {g+h x}{\frac {\sqrt {-a} h}{\sqrt {c}}+g}\right )^{-p} F_1\left (-2 p;-p,-p;1-2 p;\frac {g+h x}{g-\frac {\sqrt {-a} h}{\sqrt {c}}},\frac {g+h x}{g+\frac {\sqrt {-a} h}{\sqrt {c}}}\right )}{2 h^3 p}-\frac {\left (a+c x^2\right )^{p+1} (g+h x)^{-2 (p+1)} \left (d h^2-e g h+f g^2\right )}{2 h (p+1) \left (a h^2+c g^2\right )}+\frac {\left (\sqrt {-a}-\sqrt {c} x\right ) \left (a+c x^2\right )^p (g+h x)^{-2 p-1} \left (-\frac {\left (\sqrt {-a}+\sqrt {c} x\right ) \left (\sqrt {-a} h+\sqrt {c} g\right )}{\left (\sqrt {-a}-\sqrt {c} x\right ) \left (\sqrt {c} g-\sqrt {-a} h\right )}\right )^{-p} \left (a h^2 (2 f g-e h)+c \left (f g^3-d g h^2\right )\right ) \, _2F_1\left (-2 p-1,-p;-2 p;\frac {2 \sqrt {-a} \sqrt {c} (g+h x)}{\left (\sqrt {c} g-\sqrt {-a} h\right ) \left (\sqrt {-a}-\sqrt {c} x\right )}\right )}{h^2 (2 p+1) \left (\sqrt {-a} h+\sqrt {c} g\right ) \left (a h^2+c g^2\right )} \]

[Out]

-1/2*(d*h^2-e*g*h+f*g^2)*(c*x^2+a)^(1+p)/h/(a*h^2+c*g^2)/(1+p)/((h*x+g)^(2+2*p))-1/2*f*(c*x^2+a)^p*AppellF1(-2
*p,-p,-p,1-2*p,(h*x+g)/(g-h*(-a)^(1/2)/c^(1/2)),(h*x+g)/(g+h*(-a)^(1/2)/c^(1/2)))/h^3/p/((h*x+g)^(2*p))/((1+(-
h*x-g)/(g-h*(-a)^(1/2)/c^(1/2)))^p)/((1+(-h*x-g)/(g+h*(-a)^(1/2)/c^(1/2)))^p)+(a*h^2*(-e*h+2*f*g)+c*(-d*g*h^2+
f*g^3))*(h*x+g)^(-1-2*p)*(c*x^2+a)^p*hypergeom([-p, -1-2*p],[-2*p],2*(h*x+g)*(-a)^(1/2)*c^(1/2)/(-h*(-a)^(1/2)
+g*c^(1/2))/((-a)^(1/2)-x*c^(1/2)))*((-a)^(1/2)-x*c^(1/2))/h^2/(a*h^2+c*g^2)/(1+2*p)/(h*(-a)^(1/2)+g*c^(1/2))/
((-(h*(-a)^(1/2)+g*c^(1/2))*((-a)^(1/2)+x*c^(1/2))/(-h*(-a)^(1/2)+g*c^(1/2))/((-a)^(1/2)-x*c^(1/2)))^p)

________________________________________________________________________________________

Rubi [A]  time = 0.52, antiderivative size = 474, normalized size of antiderivative = 1.00, number of steps used = 5, number of rules used = 5, integrand size = 31, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.161, Rules used = {1656, 760, 133, 807, 727} \[ -\frac {f \left (a+c x^2\right )^p (g+h x)^{-2 p} \left (1-\frac {g+h x}{g-\frac {\sqrt {-a} h}{\sqrt {c}}}\right )^{-p} \left (1-\frac {g+h x}{\frac {\sqrt {-a} h}{\sqrt {c}}+g}\right )^{-p} F_1\left (-2 p;-p,-p;1-2 p;\frac {g+h x}{g-\frac {\sqrt {-a} h}{\sqrt {c}}},\frac {g+h x}{g+\frac {\sqrt {-a} h}{\sqrt {c}}}\right )}{2 h^3 p}+\frac {\left (\sqrt {-a}-\sqrt {c} x\right ) \left (a+c x^2\right )^p (g+h x)^{-2 p-1} \left (-\frac {\left (\sqrt {-a}+\sqrt {c} x\right ) \left (\sqrt {-a} h+\sqrt {c} g\right )}{\left (\sqrt {-a}-\sqrt {c} x\right ) \left (\sqrt {c} g-\sqrt {-a} h\right )}\right )^{-p} \left (a h^2 (2 f g-e h)+c \left (f g^3-d g h^2\right )\right ) \, _2F_1\left (-2 p-1,-p;-2 p;\frac {2 \sqrt {-a} \sqrt {c} (g+h x)}{\left (\sqrt {c} g-\sqrt {-a} h\right ) \left (\sqrt {-a}-\sqrt {c} x\right )}\right )}{h^2 (2 p+1) \left (\sqrt {-a} h+\sqrt {c} g\right ) \left (a h^2+c g^2\right )}-\frac {\left (a+c x^2\right )^{p+1} (g+h x)^{-2 (p+1)} \left (d h^2-e g h+f g^2\right )}{2 h (p+1) \left (a h^2+c g^2\right )} \]

Antiderivative was successfully verified.

[In]

Int[(g + h*x)^(-3 - 2*p)*(a + c*x^2)^p*(d + e*x + f*x^2),x]

[Out]

-((f*g^2 - e*g*h + d*h^2)*(a + c*x^2)^(1 + p))/(2*h*(c*g^2 + a*h^2)*(1 + p)*(g + h*x)^(2*(1 + p))) - (f*(a + c
*x^2)^p*AppellF1[-2*p, -p, -p, 1 - 2*p, (g + h*x)/(g - (Sqrt[-a]*h)/Sqrt[c]), (g + h*x)/(g + (Sqrt[-a]*h)/Sqrt
[c])])/(2*h^3*p*(g + h*x)^(2*p)*(1 - (g + h*x)/(g - (Sqrt[-a]*h)/Sqrt[c]))^p*(1 - (g + h*x)/(g + (Sqrt[-a]*h)/
Sqrt[c]))^p) + ((a*h^2*(2*f*g - e*h) + c*(f*g^3 - d*g*h^2))*(Sqrt[-a] - Sqrt[c]*x)*(g + h*x)^(-1 - 2*p)*(a + c
*x^2)^p*Hypergeometric2F1[-1 - 2*p, -p, -2*p, (2*Sqrt[-a]*Sqrt[c]*(g + h*x))/((Sqrt[c]*g - Sqrt[-a]*h)*(Sqrt[-
a] - Sqrt[c]*x))])/(h^2*(Sqrt[c]*g + Sqrt[-a]*h)*(c*g^2 + a*h^2)*(1 + 2*p)*(-(((Sqrt[c]*g + Sqrt[-a]*h)*(Sqrt[
-a] + Sqrt[c]*x))/((Sqrt[c]*g - Sqrt[-a]*h)*(Sqrt[-a] - Sqrt[c]*x))))^p)

Rule 133

Int[((b_.)*(x_))^(m_)*((c_) + (d_.)*(x_))^(n_)*((e_) + (f_.)*(x_))^(p_), x_Symbol] :> Simp[(c^n*e^p*(b*x)^(m +
 1)*AppellF1[m + 1, -n, -p, m + 2, -((d*x)/c), -((f*x)/e)])/(b*(m + 1)), x] /; FreeQ[{b, c, d, e, f, m, n, p},
 x] &&  !IntegerQ[m] &&  !IntegerQ[n] && GtQ[c, 0] && (IntegerQ[p] || GtQ[e, 0])

Rule 727

Int[((d_) + (e_.)*(x_))^(m_)*((a_) + (c_.)*(x_)^2)^(p_), x_Symbol] :> Simp[((Rt[-(a*c), 2] - c*x)*(d + e*x)^(m
 + 1)*(a + c*x^2)^p*Hypergeometric2F1[m + 1, -p, m + 2, (2*c*Rt[-(a*c), 2]*(d + e*x))/((c*d - e*Rt[-(a*c), 2])
*(Rt[-(a*c), 2] - c*x))])/((m + 1)*(c*d + e*Rt[-(a*c), 2])*(((c*d + e*Rt[-(a*c), 2])*(Rt[-(a*c), 2] + c*x))/((
c*d - e*Rt[-(a*c), 2])*(-Rt[-(a*c), 2] + c*x)))^p), x] /; FreeQ[{a, c, d, e, m, p}, x] && NeQ[c*d^2 + a*e^2, 0
] &&  !IntegerQ[p] && EqQ[m + 2*p + 2, 0]

Rule 760

Int[((d_) + (e_.)*(x_))^(m_)*((a_) + (c_.)*(x_)^2)^(p_), x_Symbol] :> With[{q = Rt[-(a*c), 2]}, Dist[(a + c*x^
2)^p/(e*(1 - (d + e*x)/(d + (e*q)/c))^p*(1 - (d + e*x)/(d - (e*q)/c))^p), Subst[Int[x^m*Simp[1 - x/(d + (e*q)/
c), x]^p*Simp[1 - x/(d - (e*q)/c), x]^p, x], x, d + e*x], x]] /; FreeQ[{a, c, d, e, m, p}, x] && NeQ[c*d^2 + a
*e^2, 0] &&  !IntegerQ[p]

Rule 807

Int[((d_.) + (e_.)*(x_))^(m_)*((f_.) + (g_.)*(x_))*((a_) + (c_.)*(x_)^2)^(p_.), x_Symbol] :> -Simp[((e*f - d*g
)*(d + e*x)^(m + 1)*(a + c*x^2)^(p + 1))/(2*(p + 1)*(c*d^2 + a*e^2)), x] + Dist[(c*d*f + a*e*g)/(c*d^2 + a*e^2
), Int[(d + e*x)^(m + 1)*(a + c*x^2)^p, x], x] /; FreeQ[{a, c, d, e, f, g, m, p}, x] && NeQ[c*d^2 + a*e^2, 0]
&& EqQ[Simplify[m + 2*p + 3], 0]

Rule 1656

Int[(Pq_)*((d_) + (e_.)*(x_))^(m_.)*((a_) + (c_.)*(x_)^2)^(p_.), x_Symbol] :> With[{q = Expon[Pq, x]}, Dist[Co
eff[Pq, x, q]/e^q, Int[(d + e*x)^(m + q)*(a + c*x^2)^p, x], x] + Dist[1/e^q, Int[(d + e*x)^m*(a + c*x^2)^p*Exp
andToSum[e^q*Pq - Coeff[Pq, x, q]*(d + e*x)^q, x], x], x]] /; FreeQ[{a, c, d, e, m, p}, x] && PolyQ[Pq, x] &&
NeQ[c*d^2 + a*e^2, 0] &&  !(IGtQ[m, 0] && RationalQ[a, c, d, e] && (IntegerQ[p] || ILtQ[p + 1/2, 0]))

Rubi steps

\begin {align*} \int (g+h x)^{-3-2 p} \left (a+c x^2\right )^p \left (d+e x+f x^2\right ) \, dx &=\frac {\int (g+h x)^{-3-2 p} \left (-f g^2+d h^2-h (2 f g-e h) x\right ) \left (a+c x^2\right )^p \, dx}{h^2}+\frac {f \int (g+h x)^{-1-2 p} \left (a+c x^2\right )^p \, dx}{h^2}\\ &=-\frac {\left (f g^2-e g h+d h^2\right ) (g+h x)^{-2 (1+p)} \left (a+c x^2\right )^{1+p}}{2 h \left (c g^2+a h^2\right ) (1+p)}-\frac {\left (a h^2 (2 f g-e h)+c \left (f g^3-d g h^2\right )\right ) \int (g+h x)^{-2-2 p} \left (a+c x^2\right )^p \, dx}{h^2 \left (c g^2+a h^2\right )}+\frac {\left (f \left (a+c x^2\right )^p \left (1-\frac {g+h x}{g-\frac {\sqrt {-a} h}{\sqrt {c}}}\right )^{-p} \left (1-\frac {g+h x}{g+\frac {\sqrt {-a} h}{\sqrt {c}}}\right )^{-p}\right ) \operatorname {Subst}\left (\int x^{-1-2 p} \left (1-\frac {x}{g-\frac {\sqrt {-a} h}{\sqrt {c}}}\right )^p \left (1-\frac {x}{g+\frac {\sqrt {-a} h}{\sqrt {c}}}\right )^p \, dx,x,g+h x\right )}{h^3}\\ &=-\frac {\left (f g^2-e g h+d h^2\right ) (g+h x)^{-2 (1+p)} \left (a+c x^2\right )^{1+p}}{2 h \left (c g^2+a h^2\right ) (1+p)}-\frac {f (g+h x)^{-2 p} \left (a+c x^2\right )^p \left (1-\frac {g+h x}{g-\frac {\sqrt {-a} h}{\sqrt {c}}}\right )^{-p} \left (1-\frac {g+h x}{g+\frac {\sqrt {-a} h}{\sqrt {c}}}\right )^{-p} F_1\left (-2 p;-p,-p;1-2 p;\frac {g+h x}{g-\frac {\sqrt {-a} h}{\sqrt {c}}},\frac {g+h x}{g+\frac {\sqrt {-a} h}{\sqrt {c}}}\right )}{2 h^3 p}+\frac {\left (a h^2 (2 f g-e h)+c \left (f g^3-d g h^2\right )\right ) \left (\sqrt {-a}-\sqrt {c} x\right ) \left (-\frac {\left (\sqrt {c} g+\sqrt {-a} h\right ) \left (\sqrt {-a}+\sqrt {c} x\right )}{\left (\sqrt {c} g-\sqrt {-a} h\right ) \left (\sqrt {-a}-\sqrt {c} x\right )}\right )^{-p} (g+h x)^{-1-2 p} \left (a+c x^2\right )^p \, _2F_1\left (-1-2 p,-p;-2 p;\frac {2 \sqrt {-a} \sqrt {c} (g+h x)}{\left (\sqrt {c} g-\sqrt {-a} h\right ) \left (\sqrt {-a}-\sqrt {c} x\right )}\right )}{h^2 \left (\sqrt {c} g+\sqrt {-a} h\right ) \left (c g^2+a h^2\right ) (1+2 p)}\\ \end {align*}

________________________________________________________________________________________

Mathematica [F]  time = 2.85, size = 0, normalized size = 0.00 \[ \int (g+h x)^{-3-2 p} \left (a+c x^2\right )^p \left (d+e x+f x^2\right ) \, dx \]

Verification is Not applicable to the result.

[In]

Integrate[(g + h*x)^(-3 - 2*p)*(a + c*x^2)^p*(d + e*x + f*x^2),x]

[Out]

Integrate[(g + h*x)^(-3 - 2*p)*(a + c*x^2)^p*(d + e*x + f*x^2), x]

________________________________________________________________________________________

fricas [F]  time = 1.52, size = 0, normalized size = 0.00 \[ {\rm integral}\left ({\left (f x^{2} + e x + d\right )} {\left (c x^{2} + a\right )}^{p} {\left (h x + g\right )}^{-2 \, p - 3}, x\right ) \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((h*x+g)^(-3-2*p)*(c*x^2+a)^p*(f*x^2+e*x+d),x, algorithm="fricas")

[Out]

integral((f*x^2 + e*x + d)*(c*x^2 + a)^p*(h*x + g)^(-2*p - 3), x)

________________________________________________________________________________________

giac [F]  time = 0.00, size = 0, normalized size = 0.00 \[ \int {\left (f x^{2} + e x + d\right )} {\left (c x^{2} + a\right )}^{p} {\left (h x + g\right )}^{-2 \, p - 3}\,{d x} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((h*x+g)^(-3-2*p)*(c*x^2+a)^p*(f*x^2+e*x+d),x, algorithm="giac")

[Out]

integrate((f*x^2 + e*x + d)*(c*x^2 + a)^p*(h*x + g)^(-2*p - 3), x)

________________________________________________________________________________________

maple [F]  time = 0.05, size = 0, normalized size = 0.00 \[ \int \left (f \,x^{2}+e x +d \right ) \left (c \,x^{2}+a \right )^{p} \left (h x +g \right )^{-2 p -3}\, dx \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((h*x+g)^(-3-2*p)*(c*x^2+a)^p*(f*x^2+e*x+d),x)

[Out]

int((h*x+g)^(-3-2*p)*(c*x^2+a)^p*(f*x^2+e*x+d),x)

________________________________________________________________________________________

maxima [F]  time = 0.00, size = 0, normalized size = 0.00 \[ \int {\left (f x^{2} + e x + d\right )} {\left (c x^{2} + a\right )}^{p} {\left (h x + g\right )}^{-2 \, p - 3}\,{d x} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((h*x+g)^(-3-2*p)*(c*x^2+a)^p*(f*x^2+e*x+d),x, algorithm="maxima")

[Out]

integrate((f*x^2 + e*x + d)*(c*x^2 + a)^p*(h*x + g)^(-2*p - 3), x)

________________________________________________________________________________________

mupad [F]  time = 0.00, size = -1, normalized size = -0.00 \[ \int \frac {{\left (c\,x^2+a\right )}^p\,\left (f\,x^2+e\,x+d\right )}{{\left (g+h\,x\right )}^{2\,p+3}} \,d x \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(((a + c*x^2)^p*(d + e*x + f*x^2))/(g + h*x)^(2*p + 3),x)

[Out]

int(((a + c*x^2)^p*(d + e*x + f*x^2))/(g + h*x)^(2*p + 3), x)

________________________________________________________________________________________

sympy [F(-1)]  time = 0.00, size = 0, normalized size = 0.00 \[ \text {Timed out} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((h*x+g)**(-3-2*p)*(c*x**2+a)**p*(f*x**2+e*x+d),x)

[Out]

Timed out

________________________________________________________________________________________